//
//  ExportVideoManager.h
//  lightSpot
//
//  Created by lightSpot  on 2022.
//  Copyright © 2021 lightSpot . All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

@interface LSVideoHandleManager : NSObject

//通过PHAsset 获取 AVURLAsset
+ (void)requestAVAssetForVideo:(PHAsset *)asset complete:(void (^)(AVURLAsset *urlAsset))complete;

/**
 视频裁剪
 @param startTime 起始时刻
 @param endTime 结束时刻
 @param asset 视频资源
 @param filePath 裁剪后的文件路径(可指定)
 @param completion 完成回调
 */
+ (void)cuteVideoByStartTime:(NSTimeInterval)startTime endTime:(NSTimeInterval)endTime videoAsset:(AVURLAsset *)asset filePath:(NSURL *)filePath completion:(void(^)(NSURL *fileURL))completion;

//视频分解图片
+ (void)splitVideo:(NSURL *)fileUrl fps:(float)fps splitCompleteBlock:(void(^)(BOOL success, NSMutableArray *splitimgs))splitCompleteBlock;

//获取livephoto对应的视频地址
+ (void)getVideoPathFromPHAsset:(PHAsset *)asset complete:(void (^)(NSString *filePath, NSString *fileName))complete;

//图片方向矫正
+ (UIImage *)fixOrientation:(UIImage *)aImage;

@end
